Intro
model-viewer
This package wraps the excellent web component <model-viewer> to make it easier to use/consume in toddle apps.
The model-viewer allows users to interact with complex 3D models provided as .glb or .gltf files.
Demo
Try picking different models below
You can find more models here
Components
model-viewer
The main component that wraps the web component <model-viewer>. It doesn't expose everything from the original API for now. See available attributes and events below.
Attributes
src Docs URL to the .glb or .gltf file alt Docs Text for screen readers as an alternative representation of the 3D model. poster Docs An image URL for an image to display until the model is loaded and rendered. loading Docs Loading strategy for the model. Can be "auto", "lazy" or "eager" - defaults to "auto" with-credentials Docs Uses cookies when fetching the 3D model from the "src" attribute disable-pan Docs Disables panning disable-tap Docs Disables tapping disable-zoom Docs Disables zoom auto-rotate Docs Automatically rotates the 3D model auto-fit Sets width and height to 100% of the <model-viewer> element